import AttributeRefNode from './AttributeRefNode';
import CalcRuleNode from './CalcRuleNode';
import CellValidateRuleNode from './CellValidateRuleNode';
import CodeRuleNode from './CodeRuleNode';
import FloatColumnValidateRuleNode from './FloatColumnValidateRuleNode';
import FormRefNode from './FormRefNode';
import ReportCellRefNode from './ReportCellRefNode';
import ReportFloatColumnRefNode from './ReportFloatColumnRefNode';
import ReportRangeRefNode from './ReportRangeRefNode';
import ValidateRuleNode from './ValidateRuleNode';

interface TypeMap {
  calc: CalcRuleNode;
  attr: AttributeRefNode;
  code: CodeRuleNode;
  validate: ValidateRuleNode;
  'cell-validate': CellValidateRuleNode;
  'float-column-validate': FloatColumnValidateRuleNode;
  form: FormRefNode;
  'report-cell': ReportCellRefNode;
  'report-range': ReportRangeRefNode;
  'report-float-column': ReportFloatColumnRefNode;
}

export type NodeType = keyof TypeMap;
export type GraphNode = TypeMap[NodeType];


export type ValidateNode = ValidateRuleNode | CellValidateRuleNode | FloatColumnValidateRuleNode;